package org.hawk.gwt.ppc.reflect.lang;

import java.io.Serializable;

import org.hawk.gwt.ppc.reflect.lang.mock.Mock1;
import org.hawk.gwt.ppc.reflect.lang.mock.Mock2;
import org.hawk.gwt.ppc.reflect.lang.mock.Mock3;

public class ReflectionTestHelper {
	private static boolean inited = false;
	
	private ReflectionTestHelper(){}
	
	static void initialize(){
		if(inited)return;
		inited = true;
		ClassDelegate.registerClassLoader(new ClassLoaderDelegate() {
			@Override
			protected String getPackage() {
				return "org.hawk.gwt.ppc.reflect.lang.mock";
			}
			
			@Override
			protected ClassDelegate<?>[] getClasses() {
				return new ClassDelegate<?>[]{
					Mock1.$class,Mock2.$class,Mock3.$class
				};
			}

			@Override
			protected Class<?>[] getNotReflectableClasses() {
				return new Class<?>[]{Serializable.class};
			}
		});
	}
}
